package com.vichat.ccs.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class SendMsgUtil {

    public static ExecutorService userExec0 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec1 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec2 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec3 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec4 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec5 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec6 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec7 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec8 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec9 = Executors.newFixedThreadPool(10);

    public static void startUserStateDealer(Thread userdeal, long mod){

        if(mod==0){
            userExec0.execute(userdeal);
        }else if(mod==1){
            userExec1.execute(userdeal);
        }else if(mod==2){
            userExec2.execute(userdeal);
        }else if(mod==3){
            userExec3.execute(userdeal);
        }else if(mod==4){
            userExec4.execute(userdeal);
        }else if(mod==5){
            userExec5.execute(userdeal);
        }else if(mod==6){
            userExec6.execute(userdeal);
        }else if(mod==7){
            userExec7.execute(userdeal);
        }else if(mod==8){
            userExec8.execute(userdeal);
        }else {
            userExec9.execute(userdeal);
        }
    }
}
